/**网络请求相关配置参数 */


export enum APIUrl {
  Login = "AdminUser/",
  AudioFrequency = "AudioFrequency/",
  PhotoAlbum = "PhotoAlbum/",
  ImageAsset = "ImageAsset/",
}

export enum APIMethod {
  Login = "login",
  LogOut = "logOut",
  Code2Session = "code2Session",
  DecryptionWX = "decryptionWX",
  BindPhone = "bindPhone",
  ApprovedList = "approvedList",
  Create = "create",
  AddAssets = "addAssets",
  CleanEmpty = "cleanEmpty",

  Info = "userInfo",
  Empty = "empty",
  Add = "add",
  One = "get",
  List = "list",
  All = "all",
  Remove = "remove",
  Update = "update",
  Get = "get",
  Share = "share",
  Follow = "follow",
  Histories = "histories",
  Select = "select",
  Append = "append",
  Assets = "assets",
  Close = "close",
  Search = "search",
  Mine = "mine",
  Join = "join",
  Exit = "exit",
  Detect = "detect",
  Photos = "photos",
  Activities = "activities",
  Bind = "bind",
  Classes = "classes",
  Schools = "schools",
  Students = "students",
  Teachers = "teachers",
  Validate = "validate",
  Read = "read",
  Associate = "associates",
  Certify = "certify",
  Portrait = 'portrait',
  Follows = 'follows',
  Check = 'check',
}

export enum RespResultCode {
  Success = 0,
  NoAdmin = 1,
  BindError = 2,
  NotExisted = 3,
  AddException = 4,
  RemoveException = 5,
  TokenEmpty = 6,
  TokenMiss = 7,
  TokenUnusable = 8,
  CopyFailed = 9,
  PasswordNotEqual = 10,
  AddRepeat = 11,
  AuthorError = 12,
  PhoneUsed = 13,
  UploadException = 14,
  NumberMax = 15,
  EmailUsed = 16,
  Empty = 17,
  PermissionDenied = 18,
  ValidateFailed = 19,
  TimeExpire = 20, //登录到期
  Loginout = 21,
  ParamError = 22,
  FormatNoSupport = 23,
  OptionError = 24,
  HadChildren = 25,
  FormatError = 26,
  FileError = 27,
  HadUsed = 28, //笔已被绑定
}


export enum NetStatusCode {
  Success = 200,
  Error = 500,
}


export interface WXResp {
  statusCode: number;
  errMsg: string;
  header: any;
  data: any;
}

export interface StatusResp {
  code: RespResultCode;
  data: Object;
  message: string;
}

export interface RequestResp {
  uid: string;
  status: StatusResp;
}

export interface ErrorInfo {
  status: NetStatusCode;
  errMsg: string;
  code: number;
}
